package text.traversal;

import text.Text;

public class WordToolRemover implements ITextTraversal
{
	private final int minCount;
	
	public void traversal(String word, Text text)
	{
		if(text.getOccurenceCount(word) < minCount)
		{
			text.removeWord(word);
		}
	}
	
	public WordToolRemover(int minCount)
	{
		this.minCount = minCount;
	}
}
